home *** CD-ROM | disk | FTP | other *** search
/ Interplay's Learn to Program Basic (Review Copy) / Learn to Program Basic Review Copy (Interplay)(June 23, 1998).ISO / pc / ltpbasic / refxmpl / timer.bas < prev    next >
BASIC Source File  |  1998-02-21  |  430b  |  24 lines

  1. rem Timer() example
  2.  
  3. cls
  4. print "This program shows how to use"
  5. print "the timer() function to time"
  6. print "something."
  7. print
  8.  
  9. starttime = timer()
  10. print starttime;
  11. print " is the starting milliseconds."
  12. print "Wait a few seconds, then hit return."
  13. input a$
  14.  
  15. currenttime = timer()
  16. elapsedtime = currenttime - starttime
  17. print elapsedtime;" milliseconds have elapsed."
  18. print "That's about ";int(elapsedtime/1000);" seconds."
  19.  
  20. end
  21.  
  22.  
  23.